home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / SUBmods / RunProg / test.b < prev    next >
Text File  |  1996-09-11  |  404b  |  19 lines

  1. {* A test of the RunProg function. *}
  2.  
  3. #include <SUBmods/RunProg.h>
  4.  
  5. LONGINT result, stackSize
  6. STRING prg, args
  7.  
  8. prg = InputBox$("Enter program path and name")
  9. args = InputBox$("Enter command-line arguments")
  10. stackSize = 8000
  11.  
  12. result = RunProg(prg, args, stackSize)
  13.  
  14. IF result = -1 THEN 
  15.   MsgBox "RunProg: an error occurred.","Continue"
  16. ELSE
  17.   MsgBox "RunProg returned: "+STR$(result),"Continue"
  18. END IF
  19.